class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
  before_action :require_login

  private
  def not_authenticated
    flash[:success] = '尚未有账号登录，请登录之后再执行操作'
    redirect_via_turbolinks_to new_sessions_path
  end

end
